package com.kksoft.readcm.views;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.webkit.WebView;

public class RILWebView extends WebView
{
  private a a;
  private z b;
  private d c;

  public RILWebView(Context paramContext, AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
    d locald = new d();
    this.c = locald;
  }

  public RILWebView(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
  {
    super(paramContext, paramAttributeSet, paramInt);
    d locald = new d();
    this.c = locald;
  }

  public final void a(a parama)
  {
    this.a = parama;
  }

  public final void a(z paramz)
  {
    this.b = paramz;
  }

  public final boolean a()
  {
	  int i = computeHorizontalScrollRange();
      int j = computeHorizontalScrollExtent();
      boolean flag;
      if(Math.abs(i - j) < 10)
          flag = true;
      else
          flag = false;
      return flag;
  }

  protected int computeVerticalScrollExtent()
  {
    return super.computeVerticalScrollExtent();
  }

  protected void onScrollChanged(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    super.onScrollChanged(paramInt1, paramInt2, paramInt3, paramInt4);
    this.b.a();
  }

  protected void onSizeChanged(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    super.onSizeChanged(paramInt1, paramInt2, paramInt3, paramInt4);
    if (this.a != null)
      this.a.a();
  }

  public boolean onTouchEvent(MotionEvent motionevent)
  {
	  boolean flag;
      if(motionevent == null)
      {
          flag = false;
      } else
      {
          b.a();
          e eflag = c.a(motionevent, this);
          if(eflag != null)
          {
              z z1 = b;
              int i = eflag.a();
              z1.a(i);
          }
          flag = super.onTouchEvent(motionevent);
      }
      return flag;
  }
}